//
//  BKEmotionViewCell.swift
//  微博
//
//  Created by mac on 16/8/19.
//  Copyright © 2016年 xbk. All rights reserved.
//

import UIKit

class BKEmotionViewCell: UICollectionViewCell {
    
    
    var indexPath:NSIndexPath?{
    
        didSet{
        
            guard let index = indexPath else{
            
                return
            }
            messageLabel.text = "第\(index.section + 1)组\(index.item + 1)页"
        }
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //  MARK: --  懒加载创建控件
    
    private lazy var messageLabel:UILabel = {
    
        let label = UILabel(fontSize: 15, textColor: UIColor.blackColor())
        
        
        return label
    }()
    
    //添加控件设置约束
    private func setupUI(){
    
        contentView.addSubview(messageLabel)
        
        messageLabel.snp_makeConstraints { (make) -> Void in
            
            make.center.equalTo(contentView)
        }
    }
}
